package com.cyz.springdemo.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.Date;

/**
 * @program: springdemo
 * @description: 测试用户实体类
 * @author: wangjie
 * @create: 2019-07-23 20:05
 **/
public class User {

    public String name;

    public Integer aga;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss a", locale = "zh",timezone = "GMT+8")
    public Date birthday;
    //@JsonIgnore    //不显示
    public String password;
    @JsonInclude(JsonInclude.Include.NON_NULL)      //为空时不显示
    public String desc;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAga() {
        return aga;
    }

    public void setAga(Integer aga) {
        this.aga = aga;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public User(String name, Integer aga, Date birthday, String password, String desc) {
        this.name = name;
        this.aga = aga;
        this.birthday = birthday;
        this.password = password;
        this.desc = desc;
    }

    public User(){

    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", aga=" + aga +
                ", birthday=" + birthday +
                ", password='" + password + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }


}
